home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1986 May & June / rerun-1986-05-06.d64 / label maker (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  133 lines

  1. 5 rem label maker 1.2 program (c)1985 by mike konshak
  2. 10 open4,4,7:printchr$(14)
  3. 15 poke53281,0:poke53280,0:print"[147][158]"
  4. 20 rw=6:pr=5:nc=34:cr$=chr$(13):b$=chr$(32):fori=1to80:s$=s$+b$:nexti
  5. 25 dim pr$(66)
  6. 30 print"[147]  [204]abel [205]aker (c)1985 by [205]ike [203]onshak [146]"
  7. 35 print" [212]his program will print labels out on"
  8. 40 print" your printer. [193]fter defining the label"
  9. 45 print" you will be able to run as many copies"
  10. 50 print" of the label as you desire."
  11. 55 print" [208]ossible [213]ses:"
  12. 60 printtab(5)"[210]eturn [193]ddress [204]abels"
  13. 65 printtab(5)"[198]loppy [196]isk [204]abels"
  14. 70 printtab(5)"[201]nventory [201][196] [204]abels"
  15. 75 printtab(5)"[211]weepstakes [197]ntries"
  16. 80 printtab(5)"[200]i, [201]'m...  [206]ame [212]ags"
  17. 85 print" [197]nhanced print, [195]entering and [211]erial"
  18. 90 print" [206]umbers may be formatted for an"
  19. 95 print" individual line. [208]ress [193]ny [203]ey[146]":gosub105:goto375
  20. 105 geta$:ifa$=""then105
  21. 110 return
  22. 120 print"[147]        [196]esign [217]our [207]wn [204]abels        [146]"
  23. 125 print" [208]ossible #[210][207][215][211] per [204]abel + 1?";rw
  24. 130 print"[145]"tab(29);:inputrw
  25. 135 print" #[210][207][215][211] to be [208]rinted on [204]abel?";pr
  26. 140 print"[145]"tab(29);:inputpr
  27. 145 print" [208]ossible #[195][200][193][210][193][195][212][197][210][211] per [210]ow?";nc
  28. 150 print"[145]"tab(29);:inputnc
  29. 155 print" [197]nter [196][193][212][193] for [197]ach [210]ow as [208]rompted   "
  30. 160 print" [211]et [211]pecial [205]odes by [205]aking the [198]irst "
  31. 165 print" [195]haracter one of the following:       "
  32. 170 print"      ^ [146] [197]nhanced, [196]ouble [215]ide     "
  33. 175 print"      _ [146] [195]entered in row"
  34. 180 print" [201]f the labels are to be [211][197][210][201][193][204][201][218][197][196],"
  35. 185 print" enter the '[208]ound [211]ign' as the [204][193][211][212]"
  36. 190 print" character in the row. [212]he number will"
  37. 195 print" be printed at the end of the row."
  38. 200 print"      # [146] [211]erialized [204]abels"
  39. 205 print" [206][207][212][197]: [207]nly [207][206][197] [205]ode [193]llowed per [204]ine!!"
  40. 210 print:fori=1topr
  41. 215 printi;tab(5)pr$(i):iflen(pr$(i))>34thenprint"[145][145]"tab(3);:goto218
  42. 217 print"[145]"tab(3);
  43. 218 inputpr$(i)
  44. 220 nexti:fl=1:ck=1
  45. 225 print" [210][146]evise [204]abel [211][146]ave [208][146]rint [197][146]xit"
  46. 230 gosub105:ifa$="r"ora$="[210]"then120
  47. 235 ifa$="p"ora$="[208]"then260
  48. 240 ifa$="s"ora$="[211]"thengosub455:goto260
  49. 245 ifa$="e"ora$="[197]"then375
  50. 250 goto230
  51. 260 print"[147]            [208]rint [204]abels             [146]"
  52. 265 nm=0:fori=1topr:
  53. 270 print" [204]abel:[146] "nf$:print"":fori=1topr
  54. 275 ifleft$(pr$(i),1)="^"thenprint""mid$(pr$(i),2,int(nc/2)):goto295
  55. 280 ifleft$(pr$(i),1)="_"then300
  56. 285 ifright$(pr$(i),1)="#"thenprintpr$(i)"9999":nm=1:goto295
  57. 290 printleft$(pr$(i),nc)
  58. 295 nexti:goto305
  59. 300 printleft$(s$,(nc-len(pr$(i)))/2)mid$(pr$(i),2,nc):goto295
  60. 305 print" [200]ow [205]any [204]abels [0 to [197][216][201][212]]";:inputn:ifn=0then375
  61. 310 ifnm=1thenprint" [211]tarting [193]t [204]abel [206]umber ? 1[157][157][157]";:inputnm:ifnm=0then375
  62. 320 print:fori=1ton:print" [208][210][201][206][212][201][206][199]"i"[145]":forj=1topr
  63. 325 ifleft$(pr$(j),1)="^"then350
  64. 330 ifleft$(pr$(j),1)="_"then365
  65. 335 ifright$(pr$(j),1)="#"thenprint#4,pr$(j)str$(i+nm-1):goto355
  66. 340 print#4,left$(pr$(j),nc):goto355
  67. 350 print#4,chr$(14)mid$(pr$(j),2,int(nc/2))chr$(15)
  68. 355 nextj:fork=1torw-pr:print#4," ":nextk
  69. 360 nexti:goto375
  70. 365 print#4,left$(s$,(nc-len(pr$(j)))/2)mid$(pr$(j),2,nc):goto355
  71. 375 print"[147]              [207]ption [205]enu             [146]"
  72. 380 print"        [196][146]esign [204]abel"
  73. 385 print"        [204][146]oad [204]abel [198]rom [196]isk"
  74. 390 iffl<>0then print"        [211][146]ave [204]abel to [196]isk"
  75. 395 iffl<>0then print"        [208][146]rint [204]abels"
  76. 400 print"        $[146] [196]irectory"
  77. 405 print"        [209][146]uit [208]rogram"
  78. 410 print"       [208]ress the [193]ppropriate [203]ey     "
  79. 415 gosub105:ifa$="q"ora$="[209]"thengosub575:close4:print"[147]":end
  80. 420 ifa$="p"ora$="[208]"then260
  81. 425 ifa$="l"ora$="[204]"thengosub575:gosub500:goto375
  82. 430 ifa$="d"ora$="[196]"then120
  83. 435 ifa$="s"ora$="[211]"thengosub455:goto375
  84. 440 ifa$="$"thengoto605
  85. 445 goto415
  86. 455 print" [211]ave [204]abel [213]nder [198]ile? "nf$
  87. 460 print"[145]"tab(22);:inputnf$:ifnf$=""then375
  88. 465 iflen(nf$)>12thenprint"12 [195]hrs [205]ax":print"[145][145][145]":goto455
  89. 470 open15,8,15:print#15,"s0:lm] "+nf$:gosub550:ifet=8then375
  90. 475 open5,8,5,"0:lm] "+nf$+",s,w":gosub550:ifet=8then375
  91. 480 print#5,rw;cr$;pr;cr$;nc:gosub550:ifet=8then375
  92. 482 fori=1topr:pr$=pr$(i):ifpr$=""thenpr$=">"
  93. 485 print#5,pr$:nexti:gosub550:ifet=8then550
  94. 490 gosub565:ck=0:return
  95. 500 print" [204]oad [204]abel [198]rom [198]ile? "nf$
  96. 505 print"[145]"tab(21);:inputnf$:ifnf$=""then375
  97. 510 iflen(nf$)>12thenprint"12 [195]hrs [205]ax":print"[145][145][145]":goto500
  98. 515 open15,8,15:open5,8,5,"0:lm] "+nf$+",s,r":gosub550:ifet=8then375
  99. 520 ifen=62thengosub555:goto375
  100. 525 input#5,rw,pr,nc:gosub550:ifet=8then550
  101. 530 fori=1topr:input#5,pr$(i):ifpr$(i)=">"thenpr$(i)=""
  102. 532 nexti:gosub550:ifet=8then550
  103. 535 s=st:ifs<>0then540
  104. 540 gosub565:fl=1:return
  105. 550 input#15,en,em$,et,es:ifen<20oren=62thenet=0:return
  106. 555 print" [196]isk [197][210][210][207][210][146]"en"[157], "em$","et"[157],"es:et=8
  107. 560 print" [208]ress [193]ny [203]ey[146] to [195]ontinue":gosub105
  108. 565 close5:close15:return
  109. 575 ifck=0thenreturn
  110. 580 print" [217]ou [200]ave [206][207][212] [211]aved [217]our [195]hanges!"
  111. 585 print" [208]ress [211][146]ave [204]abel [195][146]ontinue"
  112. 590 gosub105:ifa$="c"ora$="[195]"thenreturn
  113. 595 ifa$="s"ora$="[211]"thengosub455:return
  114. 605 open15,8,15:open5,8,0,"$0":print"[147]":gosub550:ifet=8then375
  115. 610 get#5,a1$,a2$
  116. 615 get#5,a1$,a2$
  117. 620 get#5,a1$,a2$
  118. 625 ifa1$<>""thena0=asc(a1$)
  119. 630 ifa2$<>""thena0=a0+asc(a2$)*256
  120. 635 printmid$(str$(a0),2);tab(3);
  121. 640 get#5,a2$:ifst<>0then685
  122. 645 ifa2$<>chr$(34)then640
  123. 650 get#5,a2$:ifa2$<>chr$(34)thenprint""a2$"[146]";:goto650
  124. 655 get#5,a2$:ifa2$=chr$(32)then655
  125. 660 printtab(20);:a3$=""
  126. 665 a3$=a3$+a2$:get#5,a2$:ifa2$<>""then665
  127. 670 printleft$(a3$,3)
  128. 675 geta$:ifa$<>""thengosub695
  129. 680 ifst=0then615
  130. 685 print" blocks free";:a0=0
  131. 690 close5:close15:printtab(25)"[208]ress [193][206][217] [203][197][217][146]":gosub105:goto375
  132. 695 gosub105:return
  133.